package vns.server.domain;

import javax.jdo.annotations.IdGeneratorStrategy;
import javax.jdo.annotations.IdentityType;
import javax.jdo.annotations.PersistenceCapable;
import javax.jdo.annotations.Persistent;
import javax.jdo.annotations.PrimaryKey;

import com.google.appengine.api.datastore.Key;

import vns.shared.SupperAdminDTO;

@PersistenceCapable(identityType = IdentityType.APPLICATION, detachable = "true")

public class SupperAdmin {
    @PrimaryKey
    @Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY)
    private Key id;
	
	@Persistent
	private String email;
	@Persistent
	private String pass;
	
	public SupperAdmin(SupperAdminDTO supperAdminDTO){
		this.email=supperAdminDTO.getEmail();
		this.pass=supperAdminDTO.getPass();
	}
	
	public void updatefromDTO(SupperAdminDTO supperAdminDTO){
		this.email=supperAdminDTO.getEmail();
		this.pass=supperAdminDTO.getPass();
	}
	
	public SupperAdminDTO toDTO(){
		SupperAdminDTO SupperAdminDTO=new SupperAdminDTO(this.id,this.email,this.pass);
		return SupperAdminDTO;
	}
	
	public Key getId(){
		return id;
	}
	
	public String getEmail(){
		return email;
	}
	
	public void setEmail(String Email){
		this.email=Email;
	}
	
	public String getPass(){
		return pass;
	}
	
	public void setPass(String Pass){
		this.pass=Pass;
	}

}
